<?php
/**
 * Output Hook
 * @author zhangyaowen
 *
 */
class Output_Hook
{
	function _display()
	{		
		$this->CI =& get_instance();
		
		//$this->CI->output->set_output('abc');
		
		$c = $this->CI->output->get_output();
		$c = preg_replace('#href="/#i', 'href="'.WEB_ROOT.'/', $c);
		$c = preg_replace('#src="/#i', 'src="'.WEB_ROOT.'/', $c);
		$c = preg_replace('#action="/#i', 'action="'.WEB_ROOT.'/', $c);
		$this->CI->output->set_output($c);
		$this->CI->output->_display();
	}	
}
